require.config({
                baseUrl:"../",
               paths:{
               bsl:'bsl',
               
               }
               });
require(['bsl'],function(bsl){
         var  eventStr='';
        
        document.addEventListener('deviceready', onDeviceready, false);
        function onDeviceready(){
        
        eventStr=eventStr+"event:  cordova加载完毕 <br>";
        var element = document.getElementById('start');
        element.innerHTML = eventStr;
        
        document.addEventListener("online", onOnline, false);
        document.addEventListener("deviceready", onDevice, false);
        document.addEventListener("pause", pauseH, false);
        document.addEventListener("resume", resumeH, false);
        document.addEventListener("offline", offlineH, false);
        
        }
              

        function onOnline() {
//        alert("已连网");
        eventStr=eventStr+"event:  已连网 <br>";
        var element = document.getElementById('start');
        element.innerHTML = eventStr;
        }



        function pauseH() {
        //alert("程序进入后台");
        eventStr=eventStr+"event:  程序进入后台 <br>";
        var element = document.getElementById('start');
        element.innerHTML = eventStr;
        }
        function resumeH() {
        //alert("程序从后台返回");
        eventStr=eventStr+"event:  程序从后台返回 <br>";
        var element = document.getElementById('start');
        element.innerHTML = eventStr;
        }
        function offlineH() {
        //alert("已断网");
        eventStr=eventStr+"event:  已断网 <br>";
        var element = document.getElementById('start');
        element.innerHTML = eventStr;
        

        }
        
        
        
        
        });